home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK2.toast / Development Kits (Disc 2) / OpenDoc Development Framework / Developer University / DU Projects / Graphics / Sources / Frame.h < prev    next >
Encoding:
Text File  |  1996-08-22  |  2.3 KB  |  63 lines  |  [TEXT/CWIE]

  1. //    Release Version:    $ ODF 2 $
  2. //    Copyright:            (c) 1993 - 1996 by Apple Computer, Inc., all rights reserved.
  3.  
  4. #ifndef FRAME_H
  5. #define FRAME_H
  6.  
  7. //=======================================================================
  8. // ----- Framework Includes -----
  9. #ifndef FWFRAME_H
  10. #include <FWFrame.h>        // FW_CFrame
  11. #endif
  12.  
  13. //=======================================================================
  14. class CGraphicsPart;
  15. class FW_CLineShape;
  16. class FW_CRegionShape;
  17. class FW_CPolygonShape;
  18. class FW_CPrintHandler;
  19.  
  20. //=======================================================================
  21. class CGraphicsFrame : public FW_CFrame {
  22. public:
  23.     FW_DECLARE_AUTO(CGraphicsFrame)
  24.                         CGraphicsFrame(Environment* ev, 
  25.                                     ODFrame* odFrame, 
  26.                                     FW_CPresentation* presentation, 
  27.                                     CGraphicsPart* graphicsPart);
  28.     virtual             ~CGraphicsFrame();
  29. protected:
  30. // overrides
  31.     virtual void        Draw(Environment *ev, 
  32.                                  ODFacet* odFacet, 
  33.                                  ODShape* invalidShape);
  34.     virtual void        FacetAdded(Environment* ev, ODFacet* facet, unsigned short facetCount);
  35.     virtual FW_Handled     DoMouseDown(Environment* ev, 
  36.                                     const FW_CMouseEvent& theMouseEvent);
  37. // overrides printing
  38.     virtual FW_CPrintHandler*    NewPrintHandler(Environment* ev);
  39.     virtual    FW_Boolean            IsCurrentlyPrintable(Environment* ev) const;
  40.     virtual void                GetPrintContentExtent(Environment *ev, FW_CPoint& extent) const;
  41. // new members
  42.     virtual FW_CPictureShape*     MyCreatePictureShape(Environment* ev);
  43.     virtual FW_CPolygonShape*     MyCreatePolygonShape(Environment* ev);
  44.     virtual FW_CLineShape*         MyCreateLineShape(Environment* ev);
  45.     virtual FW_CRegionShape*     MyCreateRegionShape(Environment* ev);
  46.     virtual void         MyDrawBackground(Environment* ev, FW_CGraphicContext& gc);
  47.     virtual void         MyDrawShapes(Environment* ev, FW_CGraphicContext& gc);
  48.     virtual void         MyDrawText(Environment* ev, FW_CGraphicContext& gc);
  49.     virtual void         MyDrawPictures(Environment* ev, FW_CGraphicContext& gc);
  50.     virtual void         MyDrawLine(Environment* ev, FW_CGraphicContext& gc);
  51.     virtual void         MyDrawPolygon(Environment* ev, FW_CGraphicContext& gc);
  52.     virtual void         MyInvalidateLine(Environment* ev);
  53. private:
  54.     FW_CPictureShape*    fLargePictureShape;
  55.     FW_CLineShape*        fLineShape;
  56.     FW_CRegionShape*    fRegionShape;
  57.     FW_CPolygonShape*    fPolygonShape;
  58.     FW_CRect            fLargePictRect;
  59. };
  60.  
  61. //=======================================================================
  62. #endif
  63.